var Casts = Moveables.extend({
	init: function (id, config){
		this._super(id, config);
		this.damege = config.damage;
	},
	update: function(width, height,monsters){
		if (this.x < 0 || this.y < 0 || this.y > height || this.x > width){
			this.kill();
			return;
		}
	
		for(i in monsters) {
			if((this.x >= monsters[i].x && this.x <= monsters[i].x+45 ) && (this.y >= monsters[i].y && this.y <= monsters[i].y+45 )) {
				this.kill();
				monsters[i].health-=20;
				monsters[i].isAttacked = true;
				return;
			}	
		}
		
		this._super();
		
	}
});